import{qiniu,init} from "./config.js"
let {config,bucketManager,uploadToken}=init({ scope: 'xmplus'});


var bucket = "xmplus";
var key = "1501872375328image-345b65c9-80dc-43ac-8294-17c4a0fb7ccc.jpg";
var bucketResult = function() {
    return new Promise(function(resolver, reject) {
        bucketManager.stat(bucket, key, function(err, respBody, respInfo) {
            if (err) {
                console.log(err);
            //throw err;
            } else {
                if (respInfo.statusCode == 200) {
                    console.log("function inside")
                    console.log(respBody)
                    resolver(respBody);
                } else {
                    resolver(respBody);
                }
            }
        });
    });
}

export default {
   bucketResult
}